# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=blackarch-devtools
pkgver=1.9
pkgrel=1
epoch=1
pkgdesc='Tools for BlackArch Linux package maintainers.'
arch=('any')
license=('custom:unknown')
depends=('devtools')
source=('pacman-blackarch64.conf'
        'pacman-blackarcharm.conf'
        'makepkg-x86_64.blackarch.conf'
        'makepkg-arm.conf'
        'makepkg-aarch64.conf')
sha512sums=('3f1329dc38c058ed3afadd23d6c5fe5f2d767d564aea7b8df568284d6cd078be32fd7d6e12a5230809577e6834cca1ba2a860383f545a35214ee4a6e02f9ae8b'
            '020a0bee4c23c9645e2dcd21864595931a4b82573eae79a101d658bfde89d605d795636d4c42cfa795272aeade4421f8fd4c3db5ee9399556444e3eee88972f0'
            'e44df446d0dcb509e409273fbf7f1d641be46fb008f0513028c02bbbac58350b400ecbc0b4483016ff13ec648525c41011454d5d80c9a6d297f4a5b61aada58b'
            'c1e0814345238da212fac9ee1814a020e83e7878a9bf11ea04a0f286103f657711075b5af69b560f6da83c32de3dd0839d55decc64eab2132344c8f003739713'
            'c2fccf40d2852599956e2251724faf5da323d1286b7af4df85aff8fa7a3c6e73fdb0b6f05151c17b5cd6c3c90b0d6e7b2d1a2a1ee3148e8fd5efbbf1ca480169')

package() {
  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/devtools/pacman.conf.d"

  # archbuild links
  ln -s archbuild "$pkgdir/usr/bin/blackarch64-x86_64-build"
  ln -s archbuild "$pkgdir/usr/bin/blackarcharm-aarch64-build"

  # pacman.conf
  #install -m 644 "$srcdir/pacman-blackarch64.conf" "$pkgdir/usr/share/devtools"
  install -m 644 "$srcdir/pacman-blackarcharm.conf" "$pkgdir/usr/share/devtools"
  install -m 644 "$srcdir/pacman-blackarch64.conf" \
    "$pkgdir/usr/share/devtools/pacman.conf.d/blackarch64.conf"
  install -m 644 "$srcdir/pacman-blackarcharm.conf" \
    "$pkgdir/usr/share/devtools/pacman.conf.d/blackarcharm.conf"

  # makepkg.conf
  install -m 644 "$srcdir/makepkg-x86_64.blackarch.conf" \
    "$pkgdir/usr/share/devtools"
  install -m 644 "$srcdir/makepkg-arm.conf" "$pkgdir/usr/share/devtools"
  install -m 644 "$srcdir/makepkg-aarch64.conf" "$pkgdir/usr/share/devtools"
}

